package com.example.graduation.service.impl;

import com.example.graduation.dao.JobApplicationMapper;
import com.example.graduation.entity.JobApplication;
import com.example.graduation.service.JobApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JobApplicationServiceImpl implements JobApplicationService {
    @Autowired
    private JobApplicationMapper jobApplicationMapper;

    @Override
    public List<JobApplication> findAll() {
        return jobApplicationMapper.findAll();
    }

    @Override
    public JobApplication findById(Integer id) {
        return jobApplicationMapper.findById(id);
    }

    @Override
    public List<JobApplication> findByJobSeekerId(Integer jobSeekerId) {
        return jobApplicationMapper.findByJobSeekerId(jobSeekerId);
    }

    @Override
    public List<JobApplication> findByCompanyJobId(Integer companyJobId) {
        return jobApplicationMapper.findByCompanyJobId(companyJobId);
    }

    @Override
    public List<JobApplication> findByStatus(String status) {
        return jobApplicationMapper.findByStatus(status);
    }

    @Override
    public int insert(JobApplication jobApplication) {
        return jobApplicationMapper.insert(jobApplication);
    }

    @Override
    public int update(JobApplication jobApplication) {
        return jobApplicationMapper.update(jobApplication);
    }

    @Override
    public int updateStatus(Integer id, String status) {
        return jobApplicationMapper.updateStatus(id, status);
    }

    @Override
    public int deleteById(Integer id) {
        return jobApplicationMapper.deleteById(id);
    }
} 